<%@ page language="java" pageEncoding="UTF-8"%>
<%@ taglib uri="http://struts.apache.org/tags-bean" prefix="bean"%>
<%@ taglib uri="http://struts.apache.org/tags-html" prefix="html"%>
<%@ taglib uri="http://struts.apache.org/tags-logic" prefix="logic"%>
<%@ taglib uri="http://displaytag.sf.net/el" prefix="display"%>
<%@ taglib uri="/WEB-INF/config/tld/fmt.tld" prefix="fmt"%>
<%@ taglib uri="http://ssh.org/selects" prefix="ssh"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path;
	String applicationPath = basePath + "/" + "application";
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
		<title></title>
		<link href="<%=path%>/css/jinmu_style.css" rel="stylesheet"
			type="text/css" />
		<script language="javascript" src="<%=path%>/js/util.js"></script>
		<script language="javascript" src="<%=path%>/js/SyncCommon.js"></script>
		<script language="javascript"
			src="<%=path%>/application/js/treeSelect.js"></script>
								<script language="javascript"
			src="<%=path%>/application/js/calendar/WdatePicker.js"></script>
	</head>
	<body>
		<div id="divTree"
			style="position: absolute; background: #FFFFFF; left: 1px; top: 1px; height =250; width: 253px; display: none"></div>
		<html:form styleId="patentForm" action="updatePatent.do?method=updatePatent"
			onsubmit="return save();">
			<input type ="hidden" name="id" id="id" value="${patent.id}"/>
			<input type ="hidden" name="projectid" id="projectid" value="${patent.projectNo}"/>
			<table cellspacing="0" cellpadding="0" width="98%" align="center"
				border="0" class="margtb5">
				<tr>
					<td align="left" class="padl5 lan12">
						<img src="<%=path%>/images/img-11.gif" width="12" height="12">
						成果管理 &gt; 专利 &gt; 编辑
					</td>
				</tr>
			</table>


			
			<table cellspacing="1" cellpadding="0" width="98%" align="center"
				border="0" class="bgcolor2 margb5">

				<tr class="bgcolor">
					<td width="18%" align="right" class="zi13">
						<bean:message
							key="com.application.patent.entity.patent.createpage.patentno"
							bundle="patentKey" />
						：					</td>
					<td width="32%" align="left" class="pad2 zi13">
						<input type="text" id="patentno" name="patentno" flag="true"
							valid="required" errMsg="请输入编号！" size="30" value="${patent.patentno}"/>
						<font color="red">*</font>					</td>
					
					<td width="18%" align="right" class="zi13">
						<bean:message
							key="com.application.patent.entity.patent.createpage.projectName"
							bundle="patentKey" />
						：					</td>
					<td width="32%" align="left" class="pad2 zi13">
						<input type="text" flag="true"  maxlength="60" value="${patent.projectname}"   id="projectName" name="projectName" readonly="true" />  
						<input type="button" onclick="chooseProject();" name="choose" value="选择" class="buttonbg" style="cursor:hand">
						<font color="red">*</font>					</td>
				</tr>
				<tr class="bgcolor">
					<td width="18%" align="right" class="zi13">
						<bean:message
							key="com.application.patent.entity.patent.createpage.projectNo" 
							bundle="patentKey" />
						：					</td>
					<td width="32%" align="left" class="pad2 zi13">
						<input type="text" id="projectNo" name="projectNo"  value="${patent.projectNo}" readonly="readonly" size="30" />					</td>
					
					<td width="18%" align="right" class="zi13">
						<bean:message
							key="com.application.patent.entity.patent.createpage.projectOrg"
							bundle="patentKey" />
						：					</td>
					<td width="32%" align="left" class="pad2 zi13">
						 <ssh:select readonly="true" id="projectOrg" propertyName="projectOrg" firstShow="Y" dataSource="collection" selectList="${orgSelect}"  type="1" defaultName="${patent.projectorg}" />	
</td>
				</tr>
				<tr class="bgcolor">
					<td width="18%" align="right" class="zi13">
						<bean:message
							key="com.application.patent.entity.patent.createpage.sman"
							bundle="patentKey" />
						：					</td>
					<td width="32%" align="left" class="pad2 zi13">
						<input type="text" id="sman" name="sman"    size="30" value="${patent.sman}"/>
						<input type="hidden" id="smanid" name="smanid" value=""  size="30" />
						<input type="hidden" id="operateid" name="operateid" value="${patent.operateid}"   size="30" />					</td>
					<td width="18%" align="right" class="zi13">
						<bean:message
							key="com.application.patent.entity.patent.createpage.sdate"
							bundle="patentKey" />
						：</td>
					<td width="32%" align="left" class="pad2 zi13">
					<input type="text" name="sdate" onclick="popUpCalendarDlg(this)"  flag="false" valid="required"  value="${patent.sdate}" errMsg="请选择申请时间！"/>					</td>
				</tr>
				<tr class="bgcolor">
					<td width="18%" align="right" class="zi13">
						<bean:message
							key="com.application.patent.entity.patent.createpage.sorg"
							bundle="patentKey" />
						：					</td>
					<td width="32%" align="left" class="pad2 zi13"><input type="text" id="sorg" name="sorg"  value="${patent.sorg}"   size="30" />
					<input type="hidden" id="sorgid" name="sorgid"    size="30" />					</td>
				<td width="18%" align="right" class="zi13">
						<bean:message
							key="com.application.patent.entity.patent.createpage.sno"
							bundle="patentKey" />
						：</td>
					<td width="32%" align="left" class="pad2 zi13">
						<input type="text" id="sno" name="sno"  value="${patent.sno}"  size="30"/>
</td>
				</tr>
									
				<tr class="bgcolor">
													<td width="18%" align="right" class="zi13">
						<bean:message
							key="com.application.patent.entity.patent.createpage.dman"
							bundle="patentKey" />
						：</td>
					<td width="32%" align="left" class="pad2 zi13">
											<input type="text" id="dman" name="dman"  value="${patent.dman}"   size="30" />
						<input type="hidden" id="dmanid" name="dmanid"   size="30" />		</td>
					<td width="18%" align="right" class="zi13">		<bean:message
							key="com.application.patent.entity.patent.createpage.dorg"
							bundle="patentKey" />：</td>
					<td width="0%" align="left" class="pad2 zi13"><input type="text" id="dorg" name="dorg"  value="${patent.dorg}"   size="30" />
				    <input type="hidden" id="dorgid" name="dorgid" value=""  size="30" />						</td>

				</tr>

				<tr class="bgcolor">
					 <td align="right" class="pad2 zi13"><bean:message
							key="com.application.patent.entity.patent.createpage.name"
							bundle="patentKey" />：</td>
			      <td align="left" class="pad2 zi13"><input type="text" id="name" name="name"   value="${patent.name}"  size="30" /></td>
				    <td width="0%" align="right" class="pad2 zi13"><bean:message
							key="com.application.patent.entity.patent.createpage.fman"
							bundle="patentKey" />：</td>
				    <td width="32%" align="left" class="pad2 zi13"><input type="text" id="fman" name="fman"  value="${patent.fman}"   size="30" />
						<input type="hidden" id="fmanid" name="fmanid" value=""  size="30" />	
						</td>

			  </tr>
				<tr class="bgcolor">
				  <td align="right" class="zi13"><bean:message
							key="com.application.patent.entity.patent.createpage.accredit"
							bundle="patentKey" />：</td>
				  <td align="left" class="pad2 zi13"><ssh:select id="accredit" propertyName="accredit" pid="PATENT_SQ"  styles="width:100px;" type="2" defaultName="${patent.accredit}"  /></td>
			      <td align="right" class="pad2 zi13"><bean:message
							key="com.application.patent.entity.patent.createpage.accreditdate"
							bundle="patentKey" />：</td>
			      <td align="left" class="pad2 zi13"><input type="text" id="accreditdate" name="accreditdate"  value="${patent.accreditdate}"   size="30" onclick="popUpCalendarDlg(this)" /></td>
			  </tr>

				<tr class="bgcolor">
				  <td align="right" class="zi13"><bean:message
							key="com.application.patent.entity.patent.createpage.accredittype"
							bundle="patentKey" />：</td>
				  <td align="left" class="pad2 zi13">
				  <ssh:select id="accredittype" propertyName="accredittype" pid="PATENT_TYPE"  styles="width:100px;" type="2" defaultName="${patent.accredittype}" />			
				  </td>
			      <td align="right" class="pad2 zi13"><bean:message
							key="com.application.patent.entity.patent.createpage.accreditfee"
							bundle="patentKey" />（元）：</td>
			      <td align="left" class="pad2 zi13"><input type="text" id="accreditfee" name="accreditfee"  value="${patent.accreditfee}"  size="30" flag="true" valid="isMoney" errMsg="请输入正确的费用！" /></td>
			  </tr>

				<tr class="bgcolor">
				  <td align="right" class="zi13"><bean:message
							key="com.application.patent.entity.patent.createpage.classno"
							bundle="patentKey" />：</td>
				  <td align="left" class="pad2 zi13"><input type="text" id="classno" name="classno"  value="${patent.classno}"  size="30"/></td>
			      <td align="right" class="pad2 zi13"><bean:message
							key="com.application.patent.entity.patent.createpage.gkno"
							bundle="patentKey" />：</td>
			      <td align="left" class="pad2 zi13"><input type="text" id="gkno" name="gkno"  value="${patent.gkno}"   size="30" /></td>
			  </tr>
			  				<tr class="bgcolor">
				  <td align="right" class="zi13"><bean:message
							key="com.application.patent.entity.patent.createpage.gkdate"
							bundle="patentKey" />：</td>
				  <td align="left" class="pad2 zi13" colspan="3"><input type="text" id="gkdate" name="gkdate"  value="${patent.gkdate}"  size="30" onclick="popUpCalendarDlg(this)" /></td>
			  </tr>
				<tr class="bgcolor">
				  <td align="right" class="zi13"><bean:message
							key="com.application.patent.entity.patent.createpage.info"
							bundle="patentKey" />
						：					</td>
				  <td align="left" class="pad2 zi13" colspan="3"><textarea rows="5" cols="100" id="info" name="info" > ${patent.info}</textarea></td>
			  </tr>
			</table>
            <iframe width="100%" height="150px" onload="this.height=show_attachment.document.body.scrollHeight"
							src="<%=path%>/queryAttachment.do?method=queryAttachment&fid=${patent.id}&type=14001"
											; scrolling="no" frameborder="0" name="show_attachment"
											id="show_attachment"></iframe>


			<p>
			<p>
			<p>
			<table width="98%" align="center" border="0" cellspacing="0"
				cellpadding="0">
				<tr>
					<td align="center">
						<input class="buttonbg" id="but_save" type="submit"
							style="cursor: hand"
							value="<bean:message key='com.manager.common.patent.save' bundle="patentKey"/>"
							name="but_save" />
						&nbsp;&nbsp;&nbsp;
						<input class="buttonbg" id="but_return" type="button"
							style="cursor: hand"
							value="<bean:message key='com.manager.common.patent.return' bundle="patentKey"/>"
							name="but_return" onClick="javascript:history.go(-1);" />
					</td>
				</tr>
			</table>

		</html:form>
	</body>
</html>


<script>

function save(){
   if(validateForm(document.forms[0],'Y'))
   {
	return true;
    }else{
	return false;
    }
}

function chooseProject(){   
    var syncHelper = new SyncHelper();
	var url = "popuSelectProjectList.do?method=popuSelectProjectList&type=1&random=" + new Date();
	var searchWin = window.showModalDialog(url,window,"help:no;scroll:yes;resizable:no;status:0;dialogWidth:1000px;dialogHeight:600px;center:yes" ); 	
    if(searchWin){
         $("projectName").value = searchWin["projectName"]==undefined?"":searchWin["projectName"];
		 $("projectNo").value = searchWin["projectNo"]==undefined?"":searchWin["projectNo"];
		 syncHelper.selectedByValue(searchWin["projectOrg"],"projectOrg");
		
		 
		 //$jq("#projectOrg option").not(":selected").attr("disabled", "disabled");

		 
    }
}
</script>





